<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>默认科目设置</title>
	<include file="Public:header" />
	<style type="text/css">
		.input{width:190px; border:1px solid #ccc; padding:2px;}
		.select{width:190px; border:1px solid #ccc; height:25px; padding:2px;}
	</style>
	<script type="text/javascript">
		function chkfrm()
		{
			if($('#code').val()=='')
			{
				$.messager.show({title:'提示',msg:'请输入代码',timeout:5000,showType:'slide'});
				return false;
			}
			if($('#title').val()=='')
			{
				$.messager.show({title:'提示',msg:'请输入名称',timeout:5000,showType:'slide'});
				return false;
			}
			if($('#orderid').val()=='')
			{
				$.messager.show({title:'提示',msg:'请正确输入排序号，只能为数字',timeout:5000,showType:'slide'});
				return false;
			}
			$('#form1').submit();
		}
		function open_facc_window()
		{
			open_popup_faccmas('objid=facc_id&objtitle=acc_code');
		}
	</script>
</head>
<body class="">

	<div class="demo-info space-out-10px">
		<div class="demo-tip icon-tip"></div>
		<div>默认科目设置，这些科目是用于单据过账时自动生成总账凭证时使用的。</div>
	</div>
	<form id="form1" method="post" action="{:U('Finance/faccdefault_add_save')}">
		<table class="space-out-10px">
		<tr>
		<td>代码：</td><td><input type="text" id="code" name="code" class="easyui-validatebox input" required="true" /></td>
		</tr>
		<tr>
		<td>名称：</td><td><input type="text" id="title" name="title" class="easyui-validatebox input" required="true" /></td>
		</tr>
		
		<tr style="display:none;">
		<td>会计科目ID：</td><td><input type="text" id="facc_id" name="facc_id" class="easyui-validatebox m-input" /></td>
		</tr>
		<tr>
		<td>会计科目：</td><td>
		<span class="searchbox input" >
		<input id="acc_code" name="acc_code" readonly="true" type="text" class="searchbox-text" style="width: 170px; ">
		<span><span class="searchbox-button" onclick="open_facc_window()"></span></span></span>
		</td>
		</tr>

		<tr>
		<td>排序号</td><td><input type="text" id="orderid" name="orderid" value="{$orderid}" class="easyui-validatebox input" required="true" /></td>
		</tr>
		<tr>
		<td>&nbsp;</td><td>
		<input type="hidden" id="status_flg" name="status_flg" value="Y" />
		<a href="javascript:;" class="easyui-linkbutton" iconCls="icon-save" onclick="chkfrm()">保存</a>
		<a href="{:U('Finance/faccdefault_list')}" class="easyui-linkbutton" iconCls="icon-undo">取消</a>
		</td>
		</tr>
		</table>
	</form>
	<include file="Public:window_popup" />
</body>
</html>
